<?php 
$cFront = Zend_Controller_Front::getInstance();
$module = $cFront->getRequest()->getModuleName();
$module = strtolower($module);

$controller = $cFront->getRequest()->getControllerName();
$controller = strtolower($controller);

$action = $cFront->getRequest()->getActionName();
$action = strtolower($action);
   $header = '';
   if($module != 'default'){
       $header = "<a href=\"/$module\">$module</a>";
   }

   if($controller != 'index'){
       if($header != ''){
           $header .= " - ";
       }
       $header .= "<a href=\"/$module/$controller\">$controller</a>";
   }

   //if($action != 'index'){
       if($header != ''){
           $header .= " - ";
       }
       $header .= ' <a href="">' . $action . '</a>';
   //}

       #echo "$module - $controller - $action"; 

    if($header != ''){ ?>
<div id="inner-header" style="font-size: 1em;">
<div id="inner-header-title"><?echo "$header"; ?></div>
<?php 
        if($module == 'default' && ($controller == 'index' || $controller == 'matter')){ ?>
<div id="inner-header-search">
<input id="matter-search" type="text" name="matter_search" />
<select style="width:100px;" id="matter-option" name="search_field">
    <option value="Ref" selected>caseref</option>
    <option value="Responsible"d>Responsible</option>
</select>
<input id="matter-ref-search" type="button" name="search" value="Quick Search"/>
</div>
<?php 
        }
        if($module == 'default' && $controller == 'matter' && $action == 'view'){ ?>
<div id="matter-head-navigation">
<button title="Previous" class="matter-navigation" id="<?php if($this->matter_index === ""){echo ((int)$this->matter_index)-1;}else{echo "matter-previous-" . $this->matter_id;} ?>"><span class="ui-icon ui-icon-seek-prev"/></button>
<button title="Next" class="matter-navigation" id="<?php if($this->matter_index === ""){echo ((int)$this->matter_index)+1;}else{echo "matter-next-" . $this->matter_id;} ?>"><span class="ui-icon ui-icon-seek-next"/></button>
</div>
<?php 
        } 
        echo "</div>";
    } 
?>
